package cn.kk.model.auth.req;

import cn.kk.constant.RegexpConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;


/**
 * 用户注册请求对象
 * @author liujunkai
 * @date 2023/8/2 11:02
 */
@Data
public class RegisterReq {

    @Pattern(regexp = RegexpConstant.PHONE, message = "手机号格式错误")
    @NotBlank(message = "请输入手机号")
    @Schema(defaultValue = "手机号")
    private String phone;

    @Pattern(regexp = RegexpConstant.PASSWORD, message = "密码格式错误")
    @NotBlank(message = "请填写密码")
    @Schema(defaultValue = "密码")
    private String password;

    @Pattern(regexp = RegexpConstant.EMAIL, message = "邮箱格式错误")
    @Schema(defaultValue = "邮箱")
    private String email;

    @NotBlank(message = "请输入验证码")
    @Schema(defaultValue = "验证码")
    private String captchaAnswer;

    @NotBlank(message = "请输入验证码")
    @Schema(defaultValue = "验证码请求id")
    private String requestId;

}